function plotarchs(p, paths)

figure
hold on

[mp, I, J] = uniquerowsdesc(cell2mat(p(:, 1:end-1)));
pp = sortrows(getpareto(mp));

scatter(mp(:, 1), mp(:, 2), 25, 'filled');
%plot(mp(:, 1), mp(:, 2), 'ro');

plot(pp(: ,1), pp(:, 2), 'bo-');

if nargin > 1
  for e = 1:length(paths)
    ep = cell2mat(p(paths{e}, 1:end-1));
    plot(ep(:, 1), ep(:, 2), 'k.-');
  end
end

legend('architecture', 'pareto point', 'followed path');
xlabel('processing time');
ylabel('cost');
title('cost/performance graph');

set(gca, 'FontSize', 18);
set(get(gca, 'XLabel'), 'FontSize', 18)
set(get(gca, 'YLabel'), 'FontSize', 18)

addarchbutton(p);

hold off
